/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package BoardGame.impl;

import BoardGame.Board;
import BoardGame.BoardGameFactory;
import BoardGame.BoardGamePackage;
import BoardGame.Field;
import BoardGame.Figure;
import BoardGame.RuleBuilder;

import MocaTree.MocaTreePackage;

import SDMLanguage.activities.ActivitiesPackage;

import SDMLanguage.patterns.PatternsPackage;

import TGGLanguage.TGGLanguagePackage;

import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EOperation;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;

import org.eclipse.emf.ecore.impl.EPackageImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Package</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class BoardGamePackageImpl extends EPackageImpl implements
		BoardGamePackage {
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass boardEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass figureEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass fieldEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass ruleBuilderEClass = null;

	/**
	 * Creates an instance of the model <b>Package</b>, registered with
	 * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
	 * package URI value.
	 * <p>Note: the correct way to create the package is via the static
	 * factory method {@link #init init()}, which also performs
	 * initialization of the package, or returns the registered package,
	 * if one already exists.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see org.eclipse.emf.ecore.EPackage.Registry
	 * @see BoardGame.BoardGamePackage#eNS_URI
	 * @see #init()
	 * @generated
	 */
	private BoardGamePackageImpl() {
		super(eNS_URI, BoardGameFactory.eINSTANCE);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private static boolean isInited = false;

	/**
	 * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
	 * 
	 * <p>This method is used to initialize {@link BoardGamePackage#eINSTANCE} when that field is accessed.
	 * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #eNS_URI
	 * @see #createPackageContents()
	 * @see #initializePackageContents()
	 * @generated
	 */
	public static BoardGamePackage init() {
		if (isInited)
			return (BoardGamePackage) EPackage.Registry.INSTANCE
					.getEPackage(BoardGamePackage.eNS_URI);

		// Obtain or create and register package
		BoardGamePackageImpl theBoardGamePackage = (BoardGamePackageImpl) (EPackage.Registry.INSTANCE
				.get(eNS_URI) instanceof BoardGamePackageImpl ? EPackage.Registry.INSTANCE
				.get(eNS_URI) : new BoardGamePackageImpl());

		isInited = true;

		// Initialize simple dependencies
		MocaTreePackage.eINSTANCE.eClass();
		TGGLanguagePackage.eINSTANCE.eClass();

		// Create package meta-data objects
		theBoardGamePackage.createPackageContents();

		// Initialize created meta-data
		theBoardGamePackage.initializePackageContents();

		// Mark meta-data to indicate it can't be changed
		theBoardGamePackage.freeze();

		// Update the registry and return the package
		EPackage.Registry.INSTANCE.put(BoardGamePackage.eNS_URI,
				theBoardGamePackage);
		return theBoardGamePackage;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getBoard() {
		return boardEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getBoard_Fields() {
		return (EReference) boardEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getBoard_SelectedFigure() {
		return (EReference) boardEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getBoard_Width() {
		return (EAttribute) boardEClass.getEStructuralFeatures().get(2);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getBoard_Height() {
		return (EAttribute) boardEClass.getEStructuralFeatures().get(3);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EOperation getBoard__Initialize__int_int() {
		return boardEClass.getEOperations().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EOperation getBoard__Pressed__Field() {
		return boardEClass.getEOperations().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EOperation getBoard__GetUpperLeftField() {
		return boardEClass.getEOperations().get(2);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getFigure() {
		return figureEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getFigure_Field() {
		return (EReference) figureEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EOperation getFigure__MoveTo__Field() {
		return figureEClass.getEOperations().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EOperation getFigure__AddTo__Field() {
		return figureEClass.getEOperations().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getField() {
		return fieldEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getField_Board() {
		return (EReference) fieldEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getField_NeighbourNorth() {
		return (EReference) fieldEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getField_NeighbourSouth() {
		return (EReference) fieldEClass.getEStructuralFeatures().get(2);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getField_NeighbourEast() {
		return (EReference) fieldEClass.getEStructuralFeatures().get(3);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getField_NeighbourWest() {
		return (EReference) fieldEClass.getEStructuralFeatures().get(4);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getField_Figure() {
		return (EReference) fieldEClass.getEStructuralFeatures().get(5);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getField_X() {
		return (EAttribute) fieldEClass.getEStructuralFeatures().get(6);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getField_Y() {
		return (EAttribute) fieldEClass.getEStructuralFeatures().get(7);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getRuleBuilder() {
		return ruleBuilderEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getRuleBuilder_LastField() {
		return (EReference) ruleBuilderEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getRuleBuilder_FigureClass() {
		return (EReference) ruleBuilderEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getRuleBuilder_FieldClass() {
		return (EReference) ruleBuilderEClass.getEStructuralFeatures().get(2);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EOperation getRuleBuilder__TransformFolder__Folder_EPackage() {
		return ruleBuilderEClass.getEOperations().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EOperation getRuleBuilder__TransformFile__Node() {
		return ruleBuilderEClass.getEOperations().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EOperation getRuleBuilder__Embed__Activity_EAnnotation() {
		return ruleBuilderEClass.getEOperations().get(2);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EOperation getRuleBuilder__TransformRule__Node() {
		return ruleBuilderEClass.getEOperations().get(3);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EOperation getRuleBuilder__TransformField__StoryPattern_ObjectVariable_Node_Node() {
		return ruleBuilderEClass.getEOperations().get(4);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public BoardGameFactory getBoardGameFactory() {
		return (BoardGameFactory) getEFactoryInstance();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private boolean isCreated = false;

	/**
	 * Creates the meta-model objects for the package.  This method is
	 * guarded to have no affect on any invocation but its first.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void createPackageContents() {
		if (isCreated)
			return;
		isCreated = true;

		// Create classes and their features
		boardEClass = createEClass(BOARD);
		createEReference(boardEClass, BOARD__FIELDS);
		createEReference(boardEClass, BOARD__SELECTED_FIGURE);
		createEAttribute(boardEClass, BOARD__WIDTH);
		createEAttribute(boardEClass, BOARD__HEIGHT);
		createEOperation(boardEClass, BOARD___INITIALIZE__INT_INT);
		createEOperation(boardEClass, BOARD___PRESSED__FIELD);
		createEOperation(boardEClass, BOARD___GET_UPPER_LEFT_FIELD);

		figureEClass = createEClass(FIGURE);
		createEReference(figureEClass, FIGURE__FIELD);
		createEOperation(figureEClass, FIGURE___MOVE_TO__FIELD);
		createEOperation(figureEClass, FIGURE___ADD_TO__FIELD);

		fieldEClass = createEClass(FIELD);
		createEReference(fieldEClass, FIELD__BOARD);
		createEReference(fieldEClass, FIELD__NEIGHBOUR_NORTH);
		createEReference(fieldEClass, FIELD__NEIGHBOUR_SOUTH);
		createEReference(fieldEClass, FIELD__NEIGHBOUR_EAST);
		createEReference(fieldEClass, FIELD__NEIGHBOUR_WEST);
		createEReference(fieldEClass, FIELD__FIGURE);
		createEAttribute(fieldEClass, FIELD__X);
		createEAttribute(fieldEClass, FIELD__Y);

		ruleBuilderEClass = createEClass(RULE_BUILDER);
		createEReference(ruleBuilderEClass, RULE_BUILDER__LAST_FIELD);
		createEReference(ruleBuilderEClass, RULE_BUILDER__FIGURE_CLASS);
		createEReference(ruleBuilderEClass, RULE_BUILDER__FIELD_CLASS);
		createEOperation(ruleBuilderEClass,
				RULE_BUILDER___TRANSFORM_FOLDER__FOLDER_EPACKAGE);
		createEOperation(ruleBuilderEClass, RULE_BUILDER___TRANSFORM_FILE__NODE);
		createEOperation(ruleBuilderEClass,
				RULE_BUILDER___EMBED__ACTIVITY_EANNOTATION);
		createEOperation(ruleBuilderEClass, RULE_BUILDER___TRANSFORM_RULE__NODE);
		createEOperation(ruleBuilderEClass,
				RULE_BUILDER___TRANSFORM_FIELD__STORYPATTERN_OBJECTVARIABLE_NODE_NODE);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private boolean isInitialized = false;

	/**
	 * Complete the initialization of the package and its meta-model.  This
	 * method is guarded to have no affect on any invocation but its first.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void initializePackageContents() {
		if (isInitialized)
			return;
		isInitialized = true;

		// Initialize package
		setName(eNAME);
		setNsPrefix(eNS_PREFIX);
		setNsURI(eNS_URI);

		// Obtain other dependent packages
		PatternsPackage thePatternsPackage = (PatternsPackage) EPackage.Registry.INSTANCE
				.getEPackage(PatternsPackage.eNS_URI);
		MocaTreePackage theMocaTreePackage = (MocaTreePackage) EPackage.Registry.INSTANCE
				.getEPackage(MocaTreePackage.eNS_URI);
		ActivitiesPackage theActivitiesPackage = (ActivitiesPackage) EPackage.Registry.INSTANCE
				.getEPackage(ActivitiesPackage.eNS_URI);

		// Create type parameters

		// Set bounds for type parameters

		// Add supertypes to classes

		// Initialize classes, features, and operations; add parameters
		initEClass(boardEClass, Board.class, "Board", !IS_ABSTRACT,
				!IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEReference(getBoard_Fields(), this.getField(),
				this.getField_Board(), "fields", null, 0, -1, Board.class,
				!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE,
				!IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
				IS_ORDERED);
		initEReference(getBoard_SelectedFigure(), this.getFigure(), null,
				"selectedFigure", null, 0, 1, Board.class, !IS_TRANSIENT,
				!IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES,
				!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getBoard_Width(), ecorePackage.getEInt(), "width", null,
				0, 1, Board.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE,
				!IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
		initEAttribute(getBoard_Height(), ecorePackage.getEInt(), "height",
				null, 1, 1, Board.class, !IS_TRANSIENT, !IS_VOLATILE,
				IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED,
				!IS_ORDERED);

		EOperation op = initEOperation(getBoard__Initialize__int_int(), null,
				"initialize", 0, 1, IS_UNIQUE, IS_ORDERED);
		addEParameter(op, ecorePackage.getEInt(), "w", 0, 1, IS_UNIQUE,
				IS_ORDERED);
		addEParameter(op, ecorePackage.getEInt(), "h", 0, 1, IS_UNIQUE,
				IS_ORDERED);

		op = initEOperation(getBoard__Pressed__Field(), null, "pressed", 0, 1,
				IS_UNIQUE, IS_ORDERED);
		addEParameter(op, this.getField(), "field", 0, 1, IS_UNIQUE, IS_ORDERED);

		initEOperation(getBoard__GetUpperLeftField(), this.getField(),
				"getUpperLeftField", 0, 1, IS_UNIQUE, IS_ORDERED);

		initEClass(figureEClass, Figure.class, "Figure", IS_ABSTRACT,
				!IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEReference(getFigure_Field(), this.getField(),
				this.getField_Figure(), "field", null, 1, 1, Figure.class,
				!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE,
				!IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
				IS_ORDERED);

		op = initEOperation(getFigure__MoveTo__Field(), null, "moveTo", 0, 1,
				IS_UNIQUE, IS_ORDERED);
		addEParameter(op, this.getField(), "field", 0, 1, IS_UNIQUE, IS_ORDERED);

		op = initEOperation(getFigure__AddTo__Field(), null, "addTo", 0, 1,
				IS_UNIQUE, IS_ORDERED);
		addEParameter(op, this.getField(), "field", 0, 1, IS_UNIQUE, IS_ORDERED);

		initEClass(fieldEClass, Field.class, "Field", !IS_ABSTRACT,
				!IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEReference(getField_Board(), this.getBoard(),
				this.getBoard_Fields(), "board", null, 1, 1, Field.class,
				!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE,
				!IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
				IS_ORDERED);
		initEReference(getField_NeighbourNorth(), this.getField(),
				this.getField_NeighbourSouth(), "NeighbourNorth", null, 0, 1,
				Field.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE,
				!IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE,
				!IS_DERIVED, IS_ORDERED);
		initEReference(getField_NeighbourSouth(), this.getField(),
				this.getField_NeighbourNorth(), "NeighbourSouth", null, 0, 1,
				Field.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE,
				!IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE,
				!IS_DERIVED, IS_ORDERED);
		initEReference(getField_NeighbourEast(), this.getField(),
				this.getField_NeighbourWest(), "NeighbourEast", null, 0, 1,
				Field.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE,
				!IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE,
				!IS_DERIVED, IS_ORDERED);
		initEReference(getField_NeighbourWest(), this.getField(),
				this.getField_NeighbourEast(), "NeighbourWest", null, 0, 1,
				Field.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE,
				!IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE,
				!IS_DERIVED, IS_ORDERED);
		initEReference(getField_Figure(), this.getFigure(),
				this.getFigure_Field(), "figure", null, 0, 1, Field.class,
				!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE,
				!IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
				IS_ORDERED);
		initEAttribute(getField_X(), ecorePackage.getEInt(), "x", null, 0, 1,
				Field.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE,
				!IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
		initEAttribute(getField_Y(), ecorePackage.getEInt(), "y", null, 1, 1,
				Field.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE,
				!IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);

		initEClass(ruleBuilderEClass, RuleBuilder.class, "RuleBuilder",
				!IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEReference(getRuleBuilder_LastField(),
				thePatternsPackage.getObjectVariable(), null, "lastField",
				null, 0, 1, RuleBuilder.class, !IS_TRANSIENT, !IS_VOLATILE,
				IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES,
				!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getRuleBuilder_FigureClass(), ecorePackage.getEClass(),
				null, "figureClass", null, 1, 1, RuleBuilder.class,
				!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE,
				IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
				IS_ORDERED);
		initEReference(getRuleBuilder_FieldClass(), ecorePackage.getEClass(),
				null, "fieldClass", null, 1, 1, RuleBuilder.class,
				!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE,
				IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
				IS_ORDERED);

		op = initEOperation(getRuleBuilder__TransformFolder__Folder_EPackage(),
				ecorePackage.getEPackage(), "transformFolder", 0, 1, IS_UNIQUE,
				IS_ORDERED);
		addEParameter(op, theMocaTreePackage.getFolder(), "folder", 0, 1,
				IS_UNIQUE, IS_ORDERED);
		addEParameter(op, ecorePackage.getEPackage(), "boardGamePackage", 0, 1,
				IS_UNIQUE, IS_ORDERED);

		op = initEOperation(getRuleBuilder__TransformFile__Node(),
				theActivitiesPackage.getActivity(), "transformFile", 0, 1,
				IS_UNIQUE, IS_ORDERED);
		addEParameter(op, theMocaTreePackage.getNode(), "root", 0, 1,
				IS_UNIQUE, IS_ORDERED);

		op = initEOperation(getRuleBuilder__Embed__Activity_EAnnotation(),
				null, "embed", 0, 1, IS_UNIQUE, IS_ORDERED);
		addEParameter(op, theActivitiesPackage.getActivity(), "activity", 0, 1,
				IS_UNIQUE, IS_ORDERED);
		addEParameter(op, ecorePackage.getEAnnotation(), "annotation", 0, 1,
				IS_UNIQUE, IS_ORDERED);

		op = initEOperation(getRuleBuilder__TransformRule__Node(),
				thePatternsPackage.getStoryPattern(), "transformRule", 0, 1,
				IS_UNIQUE, IS_ORDERED);
		addEParameter(op, theMocaTreePackage.getNode(), "ruleNode", 0, 1,
				IS_UNIQUE, IS_ORDERED);

		op = initEOperation(
				getRuleBuilder__TransformField__StoryPattern_ObjectVariable_Node_Node(),
				thePatternsPackage.getObjectVariable(), "transformField", 0, 1,
				IS_UNIQUE, IS_ORDERED);
		addEParameter(op, thePatternsPackage.getStoryPattern(), "pattern", 0,
				1, IS_UNIQUE, IS_ORDERED);
		addEParameter(op, thePatternsPackage.getObjectVariable(), "figureOV",
				0, 1, IS_UNIQUE, IS_ORDERED);
		addEParameter(op, theMocaTreePackage.getNode(), "before", 0, 1,
				IS_UNIQUE, IS_ORDERED);
		addEParameter(op, theMocaTreePackage.getNode(), "after", 0, 1,
				IS_UNIQUE, IS_ORDERED);

		// Create resource
		createResource(eNS_URI);

		// Create annotations
		// SDM
		createSDMAnnotations();
	}

	/**
	 * Initializes the annotations for <b>SDM</b>.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected void createSDMAnnotations() {
		String source = "SDM";
		addAnnotation(
				getBoard__Initialize__int_int(),
				source,
				new String[] {
						"XMI",
						"<?xml version=\"1.0\" encoding=\"ASCII\"?>\r\n<SDMLanguage.activities:Activity xmlns:xmi=\"http://www.omg.org/XMI\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ecore=\"http://www.eclipse.org/emf/2002/Ecore\" xmlns:SDMLanguage.activities=\"http://www.moflon.org/SDMLanguage.activities\" xmlns:SDMLanguage.expressions=\"http://www.moflon.org/SDMLanguage.expressions\" xmlns:SDMLanguage.patterns=\"http://www.moflon.org/SDMLanguage.patterns\" xmlns:SDMLanguage.patterns.patternExpressions=\"http://www.moflon.org/SDMLanguage.patterns.patternExpressions\" xmlns:SDMLanguage.calls.callExpressions=\"http://www.moflon.org/SDMLanguage.calls.callExpressions\" xmlns:SDMLanguage.calls=\"http://www.moflon.org/SDMLanguage.calls\" xsi:schemaLocation=\"http://www.moflon.org/SDMLanguage.activities SDMLanguage.ecore#//activities http://www.moflon.org/SDMLanguage.patterns SDMLanguage.ecore#//patterns\" owningOperation=\"http://www.moflon.org/BoardGame#//Board/initialize\">\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StartNode\" outgoing=\"#//@ownedActivityEdge.0 \" name=\"Board::initialize (w: EInt, h: EInt): void\" />\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.2\" source=\"#//@ownedActivityNode.0\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.1 \" incoming=\"#//@ownedActivityEdge.2 \" name=\"move on to next column\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" name=\"this\" type=\"ecore:EClass http://www.moflon.org/BoardGame#//Board\">\r\n        <attributeAssignment attribute=\"http://www.moflon.org/BoardGame#//Board/width\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"this.width+1\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.3\" source=\"#//@ownedActivityNode.1\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.2 #//@ownedActivityEdge.3 \" incoming=\"#//@ownedActivityEdge.6 #//@ownedActivityEdge.5 #//@ownedActivityEdge.0 \" name=\"create field\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.1 #//@ownedActivityNode.2/@storyPattern/@linkVariable.3 #//@ownedActivityNode.2/@storyPattern/@linkVariable.0 \" name=\"this\" type=\"ecore:EClass http://www.moflon.org/BoardGame#//Board\">\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"LESS\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/BoardGame#//Board/height\" object=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.0\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.calls.callExpressions:ParameterExpression\" parameter=\"http://www.moflon.org/BoardGame#//Board/initialize/h\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n      </objectVariable>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.4 #//@ownedActivityNode.2/@storyPattern/@linkVariable.2 \" incomingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.0 \" name=\"field\" type=\"ecore:EClass http://www.moflon.org/BoardGame#//Field\">\r\n        <attributeAssignment attribute=\"http://www.moflon.org/BoardGame#//Field/x\">\r\n          <valueExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/BoardGame#//Board/width\" object=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.0\" />\r\n        </attributeAssignment>\r\n        <attributeAssignment attribute=\"http://www.moflon.org/BoardGame#//Field/y\">\r\n          <valueExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/BoardGame#//Board/height\" object=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.0\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.0\" name=\"fields\" />\r\n      <objectVariable bindingSemantics=\"OPTIONAL\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.1 #//@ownedActivityNode.2/@storyPattern/@linkVariable.2 \" name=\"leftField\" type=\"ecore:EClass http://www.moflon.org/BoardGame#//Field\">\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"EQUAL\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/BoardGame#//Field/y\" object=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.2\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/BoardGame#//Board/height\" object=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.0\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"EQUAL\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/BoardGame#//Field/x\" object=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.2\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"width-1\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.2\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.0\" name=\"fields\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"OPTIONAL\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.2\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.1\" name=\"NeighbourWest\" />\r\n      <objectVariable bindingSemantics=\"OPTIONAL\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.3 #//@ownedActivityNode.2/@storyPattern/@linkVariable.4 \" name=\"upField\" type=\"ecore:EClass http://www.moflon.org/BoardGame#//Field\">\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"EQUAL\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/BoardGame#//Field/x\" object=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.3\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/BoardGame#//Board/width\" object=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.0\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"EQUAL\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/BoardGame#//Field/y\" object=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.3\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"height-1\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.3\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.0\" name=\"fields\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"OPTIONAL\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.3\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.1\" name=\"NeighbourNorth\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"FAILURE\" target=\"#//@ownedActivityNode.1\" source=\"#//@ownedActivityNode.2\" />\r\n  <ownedActivityEdge guard=\"SUCCESS\" target=\"#//@ownedActivityNode.5\" source=\"#//@ownedActivityNode.2\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.4 #//@ownedActivityEdge.5 \" incoming=\"#//@ownedActivityEdge.1 \" name=\"if width is in range, reset height\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" name=\"this\" type=\"ecore:EClass http://www.moflon.org/BoardGame#//Board\">\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"LESS\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/BoardGame#//Board/width\" object=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.0\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.calls.callExpressions:ParameterExpression\" parameter=\"http://www.moflon.org/BoardGame#//Board/initialize/w\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n        <attributeAssignment attribute=\"http://www.moflon.org/BoardGame#//Board/height\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt\" value=\"0\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"FAILURE\" target=\"#//@ownedActivityNode.4\" source=\"#//@ownedActivityNode.3\" />\r\n  <ownedActivityEdge guard=\"SUCCESS\" target=\"#//@ownedActivityNode.2\" source=\"#//@ownedActivityNode.3\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StopNode\" incoming=\"#//@ownedActivityEdge.4 \" name=\"\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.6 \" incoming=\"#//@ownedActivityEdge.3 \" name=\"move on to next row\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" name=\"this\" type=\"ecore:EClass http://www.moflon.org/BoardGame#//Board\">\r\n        <attributeAssignment attribute=\"http://www.moflon.org/BoardGame#//Board/height\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"this.height+1\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.2\" source=\"#//@ownedActivityNode.5\" />\r\n</SDMLanguage.activities:Activity>" });
		addAnnotation(
				getBoard__Pressed__Field(),
				source,
				new String[] {
						"XMI",
						"<?xml version=\"1.0\" encoding=\"ASCII\"?>\r\n<SDMLanguage.activities:Activity xmlns:xmi=\"http://www.omg.org/XMI\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ecore=\"http://www.eclipse.org/emf/2002/Ecore\" xmlns:SDMLanguage.activities=\"http://www.moflon.org/SDMLanguage.activities\" xmlns:SDMLanguage.expressions=\"http://www.moflon.org/SDMLanguage.expressions\" xmlns:SDMLanguage.patterns=\"http://www.moflon.org/SDMLanguage.patterns\" xmlns:SDMLanguage.patterns.patternExpressions=\"http://www.moflon.org/SDMLanguage.patterns.patternExpressions\" xmlns:SDMLanguage.calls.callExpressions=\"http://www.moflon.org/SDMLanguage.calls.callExpressions\" xmlns:SDMLanguage.calls=\"http://www.moflon.org/SDMLanguage.calls\" xsi:schemaLocation=\"http://www.moflon.org/SDMLanguage.activities SDMLanguage.ecore#//activities http://www.moflon.org/SDMLanguage.patterns SDMLanguage.ecore#//patterns\" owningOperation=\"http://www.moflon.org/BoardGame#//Board/pressed\">\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StartNode\" outgoing=\"#//@ownedActivityEdge.0 \" name=\"Board::pressed (field: Field): void\" />\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.1\" source=\"#//@ownedActivityNode.0\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.1 #//@ownedActivityEdge.2 \" incoming=\"#//@ownedActivityEdge.0 \" name=\"isSelected\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.0 \" name=\"this\" type=\"ecore:EClass http://www.moflon.org/BoardGame#//Board\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.0 \" name=\"selFigure\" type=\"ecore:EClass http://www.moflon.org/BoardGame#//Figure\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"DESTROY\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.0\" name=\"selectedFigure\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"FAILURE\" target=\"#//@ownedActivityNode.4\" source=\"#//@ownedActivityNode.1\" />\r\n  <ownedActivityEdge guard=\"SUCCESS\" target=\"#//@ownedActivityNode.2\" source=\"#//@ownedActivityNode.1\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StatementNode\" outgoing=\"#//@ownedActivityEdge.3 \" incoming=\"#//@ownedActivityEdge.2 \" name=\"delegateMoveToFigure\">\r\n    <statementExpression xsi:type=\"SDMLanguage.calls.callExpressions:MethodCallExpression\" callee=\"http://www.moflon.org/BoardGame#//Figure/moveTo\">\r\n      <ownedParameterBindings parameter=\"http://www.moflon.org/BoardGame#//Figure/moveTo/field\">\r\n        <valueExpression xsi:type=\"SDMLanguage.expressions:TextualExpression\" expressionText=\"field\" />\r\n      </ownedParameterBindings>\r\n      <target xsi:type=\"SDMLanguage.patterns.patternExpressions:ObjectVariableExpression\" object=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.1\" />\r\n    </statementExpression>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.3\" source=\"#//@ownedActivityNode.2\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StopNode\" incoming=\"#//@ownedActivityEdge.3 #//@ownedActivityEdge.4 \" name=\"\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.4 \" incoming=\"#//@ownedActivityEdge.1 \" name=\"noFigureSelected\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.4/@storyPattern/@linkVariable.1 \" name=\"field\" type=\"ecore:EClass http://www.moflon.org/BoardGame#//Field\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.4/@storyPattern/@linkVariable.0 #//@ownedActivityNode.4/@storyPattern/@linkVariable.1 \" name=\"toBeSelFigure\" type=\"ecore:EClass http://www.moflon.org/BoardGame#//Figure\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.4/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.4/@storyPattern/@objectVariable.2\" name=\"selectedFigure\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.4/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.4/@storyPattern/@objectVariable.0\" name=\"figure\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.4/@storyPattern/@linkVariable.0 \" name=\"this\" type=\"ecore:EClass http://www.moflon.org/BoardGame#//Board\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.3\" source=\"#//@ownedActivityNode.4\" />\r\n</SDMLanguage.activities:Activity>" });
		addAnnotation(
				getBoard__GetUpperLeftField(),
				source,
				new String[] {
						"XMI",
						"<?xml version=\"1.0\" encoding=\"ASCII\"?>\r\n<SDMLanguage.activities:Activity xmlns:xmi=\"http://www.omg.org/XMI\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ecore=\"http://www.eclipse.org/emf/2002/Ecore\" xmlns:SDMLanguage.activities=\"http://www.moflon.org/SDMLanguage.activities\" xmlns:SDMLanguage.expressions=\"http://www.moflon.org/SDMLanguage.expressions\" xmlns:SDMLanguage.patterns=\"http://www.moflon.org/SDMLanguage.patterns\" xmlns:SDMLanguage.patterns.patternExpressions=\"http://www.moflon.org/SDMLanguage.patterns.patternExpressions\" xmlns:SDMLanguage.calls.callExpressions=\"http://www.moflon.org/SDMLanguage.calls.callExpressions\" xmlns:SDMLanguage.calls=\"http://www.moflon.org/SDMLanguage.calls\" xsi:schemaLocation=\"http://www.moflon.org/SDMLanguage.activities SDMLanguage.ecore#//activities http://www.moflon.org/SDMLanguage.patterns SDMLanguage.ecore#//patterns\" owningOperation=\"http://www.moflon.org/BoardGame#//Board/getUpperLeftField\">\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StartNode\" outgoing=\"#//@ownedActivityEdge.0 \" name=\"Board::getUpperLeftField (): Field\" />\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.1\" source=\"#//@ownedActivityNode.0\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.1 \" incoming=\"#//@ownedActivityEdge.0 \" name=\"determine field with neither northern nor western neighbour\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.0 \" name=\"this\" type=\"ecore:EClass http://www.moflon.org/BoardGame#//Board\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.1 #//@ownedActivityNode.1/@storyPattern/@linkVariable.2 \" incomingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.0 \" name=\"field\" type=\"ecore:EClass http://www.moflon.org/BoardGame#//Field\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.0\" name=\"fields\" />\r\n      <objectVariable bindingSemantics=\"NEGATIVE\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.1 \" name=\"north\" type=\"ecore:EClass http://www.moflon.org/BoardGame#//Field\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.2\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.1\" name=\"NeighbourNorth\" />\r\n      <objectVariable bindingSemantics=\"NEGATIVE\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.2 \" name=\"west\" type=\"ecore:EClass http://www.moflon.org/BoardGame#//Field\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.3\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.1\" name=\"NeighbourWest\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.2\" source=\"#//@ownedActivityNode.1\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StopNode\" incoming=\"#//@ownedActivityEdge.1 \" name=\"field\">\r\n    <returnValue xsi:type=\"SDMLanguage.patterns.patternExpressions:ObjectVariableExpression\" object=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.1\" />\r\n  </ownedActivityNode>\r\n</SDMLanguage.activities:Activity>" });
		addAnnotation(
				getFigure__AddTo__Field(),
				source,
				new String[] {
						"XMI",
						"<?xml version=\"1.0\" encoding=\"ASCII\"?>\r\n<SDMLanguage.activities:Activity xmlns:xmi=\"http://www.omg.org/XMI\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ecore=\"http://www.eclipse.org/emf/2002/Ecore\" xmlns:SDMLanguage.activities=\"http://www.moflon.org/SDMLanguage.activities\" xmlns:SDMLanguage.expressions=\"http://www.moflon.org/SDMLanguage.expressions\" xmlns:SDMLanguage.patterns=\"http://www.moflon.org/SDMLanguage.patterns\" xmlns:SDMLanguage.patterns.patternExpressions=\"http://www.moflon.org/SDMLanguage.patterns.patternExpressions\" xmlns:SDMLanguage.calls.callExpressions=\"http://www.moflon.org/SDMLanguage.calls.callExpressions\" xmlns:SDMLanguage.calls=\"http://www.moflon.org/SDMLanguage.calls\" xsi:schemaLocation=\"http://www.moflon.org/SDMLanguage.activities SDMLanguage.ecore#//activities http://www.moflon.org/SDMLanguage.patterns SDMLanguage.ecore#//patterns\" owningOperation=\"http://www.moflon.org/BoardGame#//Figure/addTo\">\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StartNode\" outgoing=\"#//@ownedActivityEdge.0 \" name=\"Figure::addTo (field: Field): void\" />\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.1\" source=\"#//@ownedActivityNode.0\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.1 \" incoming=\"#//@ownedActivityEdge.0 \" name=\"connectFieldToFigure\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.0 \" name=\"this\" type=\"ecore:EClass http://www.moflon.org/BoardGame#//Figure\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" incomingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.0 \" name=\"field\" type=\"ecore:EClass http://www.moflon.org/BoardGame#//Field\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.0\" name=\"field\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.2\" source=\"#//@ownedActivityNode.1\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StopNode\" incoming=\"#//@ownedActivityEdge.1 \" name=\"\" />\r\n</SDMLanguage.activities:Activity>" });
		addAnnotation(
				getRuleBuilder__TransformFolder__Folder_EPackage(),
				source,
				new String[] {
						"XMI",
						"<?xml version=\"1.0\" encoding=\"ASCII\"?>\r\n<SDMLanguage.activities:Activity xmlns:xmi=\"http://www.omg.org/XMI\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ecore=\"http://www.eclipse.org/emf/2002/Ecore\" xmlns:SDMLanguage.activities=\"http://www.moflon.org/SDMLanguage.activities\" xmlns:SDMLanguage.expressions=\"http://www.moflon.org/SDMLanguage.expressions\" xmlns:SDMLanguage.patterns=\"http://www.moflon.org/SDMLanguage.patterns\" xmlns:SDMLanguage.patterns.patternExpressions=\"http://www.moflon.org/SDMLanguage.patterns.patternExpressions\" xmlns:SDMLanguage.calls.callExpressions=\"http://www.moflon.org/SDMLanguage.calls.callExpressions\" xmlns:SDMLanguage.calls=\"http://www.moflon.org/SDMLanguage.calls\" xsi:schemaLocation=\"http://www.moflon.org/SDMLanguage.activities SDMLanguage.ecore#//activities http://www.moflon.org/SDMLanguage.patterns SDMLanguage.ecore#//patterns\" owningOperation=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformFolder\">\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StartNode\" outgoing=\"#//@ownedActivityEdge.0 \" name=\"RuleBuilder::transformFolder (folder: Folder, boardGamePackage: EPackage): EPackage\" />\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.4\" source=\"#//@ownedActivityNode.0\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"true\" outgoing=\"#//@ownedActivityEdge.1 #//@ownedActivityEdge.2 \" incoming=\"#//@ownedActivityEdge.4 #//@ownedActivityEdge.5 \" name=\"for all files in the parsed MocaTree\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.0 \" name=\"folder\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Folder\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.1 \" incomingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.0 \" name=\"file\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//File\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.0\" name=\"file\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.1 \" name=\"main\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.2\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.1\" name=\"rootNode\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"EACH_TIME\" target=\"#//@ownedActivityNode.2\" source=\"#//@ownedActivityNode.1\" />\r\n  <ownedActivityEdge guard=\"END\" target=\"#//@ownedActivityNode.3\" source=\"#//@ownedActivityNode.1\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.3 \" incoming=\"#//@ownedActivityEdge.1 \" name=\"create new FigureClass with moveTo EOperation\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.9 #//@ownedActivityNode.2/@storyPattern/@linkVariable.2 \" name=\"this\" type=\"ecore:EClass http://www.moflon.org/BoardGame#//RuleBuilder\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.0 #//@ownedActivityNode.2/@storyPattern/@linkVariable.8 \" name=\"boardGamePackage\" type=\"ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EPackage\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.0 #//@ownedActivityNode.2/@storyPattern/@linkVariable.1 #//@ownedActivityNode.2/@storyPattern/@linkVariable.2 \" name=\"genricFigureClass\" type=\"ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass\">\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"EQUAL\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.eclipse.org/emf/2002/Ecore#//ENamedElement/name\" object=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.2\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;Figure&quot;\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.2\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.1\" name=\"eClassifiers\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.2\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.3\" name=\"eSuperTypes\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.2\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.0\" name=\"figureClass\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.1 #//@ownedActivityNode.2/@storyPattern/@linkVariable.4 \" incomingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.3 \" name=\"concreteFigureClass\" type=\"ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass\">\r\n        <attributeAssignment attribute=\"http://www.eclipse.org/emf/2002/Ecore#//ENamedElement/name\">\r\n          <valueExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/MocaTree#//TreeElement/name\" object=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.1\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.3\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.7\" name=\"eClassifiers\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.6 \" incomingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.4 #//@ownedActivityNode.2/@storyPattern/@linkVariable.5 \" name=\"moveTo\" type=\"ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EOperation\">\r\n        <attributeAssignment attribute=\"http://www.eclipse.org/emf/2002/Ecore#//ENamedElement/name\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;moveTo&quot;\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.4\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.3\" name=\"eOperations\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.4\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.8\" name=\"eModelElement\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.7 \" incomingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.6 \" name=\"field\" type=\"ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EParameter\">\r\n        <attributeAssignment attribute=\"http://www.eclipse.org/emf/2002/Ecore#//ENamedElement/name\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;field&quot;\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.5\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.4\" name=\"eParameters\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.7 #//@ownedActivityNode.2/@storyPattern/@linkVariable.8 #//@ownedActivityNode.2/@storyPattern/@linkVariable.9 \" name=\"fieldClass\" type=\"ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass\">\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"EQUAL\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.eclipse.org/emf/2002/Ecore#//ENamedElement/name\" object=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.6\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;Field&quot;\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.6\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.5\" name=\"eType\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.6\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.1\" name=\"eClassifiers\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.6\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.0\" name=\"fieldClass\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.3 \" name=\"rulePackage\" type=\"ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EPackage\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.5 \" name=\"annotation\" type=\"ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EAnnotation\">\r\n        <attributeAssignment attribute=\"http://www.eclipse.org/emf/2002/Ecore#//EAnnotation/source\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;SDM&quot;\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.6\" source=\"#//@ownedActivityNode.2\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StopNode\" incoming=\"#//@ownedActivityEdge.2 \" name=\"rulePackage\">\r\n    <returnValue xsi:type=\"SDMLanguage.patterns.patternExpressions:ObjectVariableExpression\" object=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.7\" />\r\n  </ownedActivityNode>\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.4 \" incoming=\"#//@ownedActivityEdge.0 \" name=\"create a new package for the rules\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" name=\"rulePackage\" type=\"ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EPackage\">\r\n        <attributeAssignment attribute=\"http://www.eclipse.org/emf/2002/Ecore#//EPackage/nsPrefix\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;Rules&quot;\" />\r\n        </attributeAssignment>\r\n        <attributeAssignment attribute=\"http://www.eclipse.org/emf/2002/Ecore#//EPackage/nsURI\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;http://www.moflon.org/Rules&quot;\" />\r\n        </attributeAssignment>\r\n        <attributeAssignment attribute=\"http://www.eclipse.org/emf/2002/Ecore#//ENamedElement/name\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;Rules&quot;\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.1\" source=\"#//@ownedActivityNode.4\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StatementNode\" outgoing=\"#//@ownedActivityEdge.5 \" incoming=\"#//@ownedActivityEdge.6 \" name=\"add SDM to the eOperation as an annotation\">\r\n    <statementExpression xsi:type=\"SDMLanguage.calls.callExpressions:MethodCallExpression\" callee=\"http://www.moflon.org/BoardGame#//RuleBuilder/embed\">\r\n      <ownedParameterBindings parameter=\"http://www.moflon.org/BoardGame#//RuleBuilder/embed/activity\">\r\n        <valueExpression xsi:type=\"SDMLanguage.expressions:TextualExpression\" expressionText=\"activity\" />\r\n      </ownedParameterBindings>\r\n      <ownedParameterBindings parameter=\"http://www.moflon.org/BoardGame#//RuleBuilder/embed/activity\">\r\n        <valueExpression xsi:type=\"SDMLanguage.expressions:TextualExpression\" expressionText=\"annotation\" />\r\n      </ownedParameterBindings>\r\n      <target xsi:type=\"SDMLanguage.patterns.patternExpressions:ObjectVariableExpression\" object=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.0\" />\r\n    </statementExpression>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.1\" source=\"#//@ownedActivityNode.5\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.6 \" incoming=\"#//@ownedActivityEdge.3 \" name=\"process file node in the MocaTree\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" name=\"activity\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//activities/Activity\">\r\n        <bindingExpression xsi:type=\"SDMLanguage.calls.callExpressions:MethodCallExpression\" callee=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformFile\">\r\n          <ownedParameterBindings parameter=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformFile/root\">\r\n            <valueExpression xsi:type=\"SDMLanguage.expressions:TextualExpression\" expressionText=\"main\" />\r\n          </ownedParameterBindings>\r\n          <target xsi:type=\"SDMLanguage.patterns.patternExpressions:ObjectVariableExpression\" object=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.0\" />\r\n        </bindingExpression>\r\n      </objectVariable>\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.5\" source=\"#//@ownedActivityNode.6\" />\r\n</SDMLanguage.activities:Activity>" });
		addAnnotation(
				getRuleBuilder__TransformFile__Node(),
				source,
				new String[] {
						"XMI",
						"<?xml version=\"1.0\" encoding=\"ASCII\"?>\r\n<SDMLanguage.activities:Activity xmlns:xmi=\"http://www.omg.org/XMI\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ecore=\"http://www.eclipse.org/emf/2002/Ecore\" xmlns:SDMLanguage.activities=\"http://www.moflon.org/SDMLanguage.activities\" xmlns:SDMLanguage.expressions=\"http://www.moflon.org/SDMLanguage.expressions\" xmlns:SDMLanguage.patterns=\"http://www.moflon.org/SDMLanguage.patterns\" xmlns:SDMLanguage.patterns.patternExpressions=\"http://www.moflon.org/SDMLanguage.patterns.patternExpressions\" xmlns:SDMLanguage.calls.callExpressions=\"http://www.moflon.org/SDMLanguage.calls.callExpressions\" xmlns:SDMLanguage.calls=\"http://www.moflon.org/SDMLanguage.calls\" xsi:schemaLocation=\"http://www.moflon.org/SDMLanguage.activities SDMLanguage.ecore#//activities http://www.moflon.org/SDMLanguage.patterns SDMLanguage.ecore#//patterns\" owningOperation=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformFile\">\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StartNode\" outgoing=\"#//@ownedActivityEdge.0 \" name=\"RuleBuilder::transformFile (root: Node): Activity\" />\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.1\" source=\"#//@ownedActivityNode.0\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.1 \" incoming=\"#//@ownedActivityEdge.0 \" name=\"create basic initial control flow, i.e., a new activity with a start and stop node\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.2 \" incomingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.0 #//@ownedActivityNode.1/@storyPattern/@linkVariable.1 \" name=\"newActvity\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//activities/Activity\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.0\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.1\" name=\"owningActivity\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.0\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.3\" name=\"owningActivity\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.0 #//@ownedActivityNode.1/@storyPattern/@linkVariable.4 \" name=\"start\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//activities/StartNode\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.2 #//@ownedActivityNode.1/@storyPattern/@linkVariable.3 \" name=\"stop\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//activities/StopNode\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.2\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.0\" name=\"ownedActivityNode\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.2\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.3\" name=\"target\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.3 #//@ownedActivityNode.1/@storyPattern/@linkVariable.1 \" incomingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.4 \" name=\"initialEdge\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//activities/ActivityEdge\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.3\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.1\" name=\"outgoing\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" name=\"this\" type=\"ecore:EClass http://www.moflon.org/BoardGame#//RuleBuilder\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.2\" source=\"#//@ownedActivityNode.1\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"true\" outgoing=\"#//@ownedActivityEdge.2 #//@ownedActivityEdge.3 \" incoming=\"#//@ownedActivityEdge.1 #//@ownedActivityEdge.5 \" name=\"for all rules\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.0 \" name=\"root\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.0 \" name=\"rule\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\">\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"EQUAL\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/MocaTree#//TreeElement/name\" object=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.1\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;RULE&quot;\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.0\" name=\"children\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"EACH_TIME\" target=\"#//@ownedActivityNode.3\" source=\"#//@ownedActivityNode.2\" />\r\n  <ownedActivityEdge guard=\"END\" target=\"#//@ownedActivityNode.4\" source=\"#//@ownedActivityNode.2\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.4 \" incoming=\"#//@ownedActivityEdge.2 \" name=\"add new activity node for the rule; the activity node is added between the start and the second node;\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.3 \" incomingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.0 #//@ownedActivityNode.3/@storyPattern/@linkVariable.1 #//@ownedActivityNode.3/@storyPattern/@linkVariable.2 \" name=\"newActvity\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//activities/Activity\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.0\" source=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.7\" name=\"owningActivity\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.0\" source=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.6\" name=\"owningActivity\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.0\" source=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.5\" name=\"owningActivity\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.8 #//@ownedActivityNode.3/@storyPattern/@linkVariable.9 \" incomingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.3 #//@ownedActivityNode.3/@storyPattern/@linkVariable.4 \" name=\"newActivityNode\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//activities/StoryNode\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.0\" name=\"ownedActivityNode\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.4\" name=\"target\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.7 \" name=\"start\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//activities/StartNode\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.5 #//@ownedActivityNode.3/@storyPattern/@linkVariable.6 \" name=\"firstNode\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//activities/ActivityNode\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"DESTROY\" target=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.3\" source=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.4\" name=\"target\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.3\" source=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.5\" name=\"target\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.5 #//@ownedActivityNode.3/@storyPattern/@linkVariable.4 \" incomingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.7 \" name=\"initialEdge\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//activities/ActivityEdge\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.4\" source=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.2\" name=\"outgoing\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.6 #//@ownedActivityNode.3/@storyPattern/@linkVariable.2 \" incomingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.8 \" name=\"newFailEdge\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//activities/ActivityEdge\">\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//activities/ActivityEdge/guard\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"SDMLanguage.activities.EdgeGuard.FAILURE\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.5\" source=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.1\" name=\"outgoing\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.10 #//@ownedActivityNode.3/@storyPattern/@linkVariable.1 \" incomingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.9 \" name=\"newSuccessEdge\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//activities/ActivityEdge\">\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//activities/ActivityEdge/guard\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"SDMLanguage.activities.EdgeGuard.SUCCESS\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.6\" source=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.1\" name=\"outgoing\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.0 \" incomingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.10 \" name=\"newStopNode\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//activities/StopNode\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.7\" source=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.6\" name=\"target\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.5\" source=\"#//@ownedActivityNode.3\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StopNode\" incoming=\"#//@ownedActivityEdge.3 \" name=\"newActvity\">\r\n    <returnValue xsi:type=\"SDMLanguage.patterns.patternExpressions:ObjectVariableExpression\" object=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.0\" />\r\n  </ownedActivityNode>\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.5 \" incoming=\"#//@ownedActivityEdge.4 \" name=\"create StoryPattern for new ActivityNode by processing the rule\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" incomingLink=\"#//@ownedActivityNode.5/@storyPattern/@linkVariable.0 \" name=\"newActivityNode\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//activities/StoryNode\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.0\" source=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.1\" name=\"storyNode\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.5/@storyPattern/@linkVariable.0 \" name=\"pattern\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/StoryPattern\">\r\n        <bindingExpression xsi:type=\"SDMLanguage.calls.callExpressions:MethodCallExpression\" callee=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformRule\">\r\n          <ownedParameterBindings parameter=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformRule/ruleNode\">\r\n            <valueExpression xsi:type=\"SDMLanguage.expressions:TextualExpression\" expressionText=\"rule\" />\r\n          </ownedParameterBindings>\r\n          <target xsi:type=\"SDMLanguage.patterns.patternExpressions:ObjectVariableExpression\" object=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.4\" />\r\n        </bindingExpression>\r\n      </objectVariable>\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.2\" source=\"#//@ownedActivityNode.5\" />\r\n</SDMLanguage.activities:Activity>" });
		addAnnotation(
				getRuleBuilder__TransformRule__Node(),
				source,
				new String[] {
						"XMI",
						"<?xml version=\"1.0\" encoding=\"ASCII\"?>\r\n<SDMLanguage.activities:Activity xmlns:xmi=\"http://www.omg.org/XMI\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ecore=\"http://www.eclipse.org/emf/2002/Ecore\" xmlns:SDMLanguage.activities=\"http://www.moflon.org/SDMLanguage.activities\" xmlns:SDMLanguage.expressions=\"http://www.moflon.org/SDMLanguage.expressions\" xmlns:SDMLanguage.patterns=\"http://www.moflon.org/SDMLanguage.patterns\" xmlns:SDMLanguage.patterns.patternExpressions=\"http://www.moflon.org/SDMLanguage.patterns.patternExpressions\" xmlns:SDMLanguage.calls.callExpressions=\"http://www.moflon.org/SDMLanguage.calls.callExpressions\" xmlns:SDMLanguage.calls=\"http://www.moflon.org/SDMLanguage.calls\" xsi:schemaLocation=\"http://www.moflon.org/SDMLanguage.activities SDMLanguage.ecore#//activities http://www.moflon.org/SDMLanguage.patterns SDMLanguage.ecore#//patterns\" owningOperation=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformRule\">\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StartNode\" outgoing=\"#//@ownedActivityEdge.0 \" name=\"RuleBuilder::transformRule (ruleNode: Node): StoryPattern\" />\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.1\" source=\"#//@ownedActivityNode.0\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.1 \" incoming=\"#//@ownedActivityEdge.0 \" name=\"prepare variables for this and target field\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.0 \" name=\"pattern\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/StoryPattern\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.3 \" incomingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.0 \" name=\"thisOV\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable\">\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//NamedElement/name\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;this&quot;\" />\r\n        </attributeAssignment>\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable/bindingOperator\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"SDMLanguage.patterns.BindingOperator.CHECK_ONLY\" />\r\n        </attributeAssignment>\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable/bindingSemantics\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"SDMLanguage.patterns.BindingSemantics.MANDATORY\" />\r\n        </attributeAssignment>\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable/bindingState\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"SDMLanguage.patterns.BindingState.BOUND\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.0\" name=\"objectVariable\" />\r\n      <objectVariable bindingSemantics=\"OPTIONAL\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.1 \" name=\"previousFromLastRun\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"DESTROY\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.2\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.3\" name=\"lastField\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.1 #//@ownedActivityNode.1/@storyPattern/@linkVariable.2 #//@ownedActivityNode.1/@storyPattern/@linkVariable.4 \" name=\"this\" type=\"ecore:EClass http://www.moflon.org/BoardGame#//RuleBuilder\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.2 #//@ownedActivityNode.1/@storyPattern/@linkVariable.3 \" name=\"figureClass\" type=\"ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.4\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.3\" name=\"figureClass\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.4\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.1\" name=\"type\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.4 \" name=\"fieldClass\" type=\"ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.5\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.3\" name=\"fieldClass\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.2\" source=\"#//@ownedActivityNode.1\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"true\" outgoing=\"#//@ownedActivityEdge.2 #//@ownedActivityEdge.3 \" incoming=\"#//@ownedActivityEdge.1 #//@ownedActivityEdge.5 \" name=\"for all rows\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.0 #//@ownedActivityNode.2/@storyPattern/@linkVariable.1 \" name=\"ruleNode\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.2 \" incomingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.0 \" name=\"beforeNode\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\">\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"EQUAL\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/MocaTree#//TreeElement/name\" object=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.1\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;BEFORE&quot;\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.0\" name=\"children\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.1 \" name=\"afterNode\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\">\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"EQUAL\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/MocaTree#//TreeElement/name\" object=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.2\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;AFTER&quot;\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.2\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.0\" name=\"children\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.2 \" name=\"rowNodeBefore\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\">\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"EQUAL\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/MocaTree#//TreeElement/name\" object=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.3\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;ROW&quot;\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.3\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.1\" name=\"children\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"EACH_TIME\" target=\"#//@ownedActivityNode.4\" source=\"#//@ownedActivityNode.2\" />\r\n  <ownedActivityEdge guard=\"END\" target=\"#//@ownedActivityNode.10\" source=\"#//@ownedActivityNode.2\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"true\" outgoing=\"#//@ownedActivityEdge.4 #//@ownedActivityEdge.5 \" incoming=\"#//@ownedActivityEdge.11 #//@ownedActivityEdge.12 \" name=\"for all remaining field nodes in the row of the before sub(Moca)tree\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.0 \" name=\"rowNodeBefore\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.0 \" name=\"currentFieldNode\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\">\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"GREATER\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/MocaTree#//TreeElement/index\" object=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.1\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt\" value=\"0\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.0\" name=\"children\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"EACH_TIME\" target=\"#//@ownedActivityNode.12\" source=\"#//@ownedActivityNode.3\" />\r\n  <ownedActivityEdge guard=\"END\" target=\"#//@ownedActivityNode.2\" source=\"#//@ownedActivityNode.3\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.6 \" incoming=\"#//@ownedActivityEdge.2 \" name=\"handle first field in a Row; i.e. match the first field of a row in subtree &quot;before&quot; and &quot;after&quot;\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.4/@storyPattern/@linkVariable.2 \" name=\"afterNode\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.4/@storyPattern/@linkVariable.0 \" name=\"rowNodeBefore\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.4/@storyPattern/@linkVariable.0 \" name=\"firstFieldNode\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\">\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"EQUAL\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/MocaTree#//TreeElement/index\" object=\"#//@ownedActivityNode.4/@storyPattern/@objectVariable.2\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt\" value=\"0\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.4/@storyPattern/@objectVariable.2\" source=\"#//@ownedActivityNode.4/@storyPattern/@objectVariable.1\" name=\"children\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.4/@storyPattern/@linkVariable.1 \" name=\"firstFieldNodeAfter\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\">\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"EQUAL\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/MocaTree#//TreeElement/index\" object=\"#//@ownedActivityNode.4/@storyPattern/@objectVariable.2\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt\" value=\"0\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.4/@storyPattern/@objectVariable.3\" source=\"#//@ownedActivityNode.4/@storyPattern/@objectVariable.4\" name=\"children\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.4/@storyPattern/@linkVariable.1 \" incomingLink=\"#//@ownedActivityNode.4/@storyPattern/@linkVariable.2 \" name=\"rowNodeAfter\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\">\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"EQUAL\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/MocaTree#//TreeElement/name\" object=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.3\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;ROW&quot;\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"EQUAL\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/MocaTree#//TreeElement/index\" object=\"#//@ownedActivityNode.4/@storyPattern/@objectVariable.4\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/MocaTree#//TreeElement/index\" object=\"#//@ownedActivityNode.4/@storyPattern/@objectVariable.1\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.4/@storyPattern/@objectVariable.4\" source=\"#//@ownedActivityNode.4/@storyPattern/@objectVariable.0\" name=\"children\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.11\" source=\"#//@ownedActivityNode.4\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.7 \" incoming=\"#//@ownedActivityEdge.14 \" name=\"Create a new Field Object Variable and add it to the story pattern; create a like to the firstFieldOV ( the previously prcessed field in a row)\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.5/@storyPattern/@linkVariable.2 \" name=\"pattern\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/StoryPattern\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" incomingLink=\"#//@ownedActivityNode.5/@storyPattern/@linkVariable.0 \" name=\"currentFieldOV\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable\">\r\n        <bindingExpression xsi:type=\"SDMLanguage.calls.callExpressions:MethodCallExpression\" callee=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformField\">\r\n          <ownedParameterBindings parameter=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformField/pattern\">\r\n            <valueExpression xsi:type=\"SDMLanguage.expressions:TextualExpression\" expressionText=\"pattern\" />\r\n          </ownedParameterBindings>\r\n          <ownedParameterBindings parameter=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformField/thisOV\">\r\n            <valueExpression xsi:type=\"SDMLanguage.expressions:TextualExpression\" expressionText=\"thisOV\" />\r\n          </ownedParameterBindings>\r\n          <ownedParameterBindings parameter=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformField/before\">\r\n            <valueExpression xsi:type=\"SDMLanguage.expressions:TextualExpression\" expressionText=\"currentFieldNode\" />\r\n          </ownedParameterBindings>\r\n          <ownedParameterBindings parameter=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformField/after\">\r\n            <valueExpression xsi:type=\"SDMLanguage.expressions:TextualExpression\" expressionText=\"currentFieldNodeAfter\" />\r\n          </ownedParameterBindings>\r\n          <target xsi:type=\"SDMLanguage.patterns.patternExpressions:ObjectVariableExpression\" object=\"#//@ownedActivityNode.6/@storyPattern/@objectVariable.0\" />\r\n        </bindingExpression>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.3\" name=\"target\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" incomingLink=\"#//@ownedActivityNode.5/@storyPattern/@linkVariable.1 \" name=\"firstFieldOV\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.2\" source=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.3\" name=\"source\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.5/@storyPattern/@linkVariable.1 #//@ownedActivityNode.5/@storyPattern/@linkVariable.0 \" incomingLink=\"#//@ownedActivityNode.5/@storyPattern/@linkVariable.2 \" name=\"linkToPreviousOV\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/LinkVariable\">\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//NamedElement/name\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;NeighbourEast&quot;\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.3\" source=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.0\" name=\"linkVariable\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.9\" source=\"#//@ownedActivityNode.5\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.8 #//@ownedActivityEdge.9 \" incoming=\"#//@ownedActivityEdge.13 \" name=\"check if last field reference of the Rule builder (stores the first field of the row previously processed) exists (if true: not the first row; if false: first row processed)\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.6/@storyPattern/@linkVariable.0 \" name=\"this\" type=\"ecore:EClass http://www.moflon.org/BoardGame#//RuleBuilder\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.6/@storyPattern/@linkVariable.0 \" name=\"previousOV\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"DESTROY\" target=\"#//@ownedActivityNode.6/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.6/@storyPattern/@objectVariable.0\" name=\"lastField\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"SUCCESS\" target=\"#//@ownedActivityNode.7\" source=\"#//@ownedActivityNode.6\" />\r\n  <ownedActivityEdge guard=\"FAILURE\" target=\"#//@ownedActivityNode.8\" source=\"#//@ownedActivityNode.6\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.10 \" incoming=\"#//@ownedActivityEdge.8 \" name=\"create a link to first field of the previous row\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.7/@storyPattern/@linkVariable.1 #//@ownedActivityNode.7/@storyPattern/@linkVariable.2 \" incomingLink=\"#//@ownedActivityNode.7/@storyPattern/@linkVariable.0 \" name=\"linkToPreviousOV\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/LinkVariable\">\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//NamedElement/name\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;NeighbourNorth&quot;\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.7/@storyPattern/@objectVariable.0\" source=\"#//@ownedActivityNode.7/@storyPattern/@objectVariable.3\" name=\"linkVariable\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" incomingLink=\"#//@ownedActivityNode.7/@storyPattern/@linkVariable.1 \" name=\"firstFieldOV\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.7/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.7/@storyPattern/@objectVariable.0\" name=\"source\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" incomingLink=\"#//@ownedActivityNode.7/@storyPattern/@linkVariable.2 \" name=\"previousOV\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.7/@storyPattern/@objectVariable.2\" source=\"#//@ownedActivityNode.7/@storyPattern/@objectVariable.0\" name=\"target\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.7/@storyPattern/@linkVariable.0 \" name=\"pattern\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/StoryPattern\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.8\" source=\"#//@ownedActivityNode.7\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.11 \" incoming=\"#//@ownedActivityEdge.9 #//@ownedActivityEdge.10 \" name=\"set last field reference to first field of the current row\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.8/@storyPattern/@linkVariable.0 \" name=\"this\" type=\"ecore:EClass http://www.moflon.org/BoardGame#//RuleBuilder\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" incomingLink=\"#//@ownedActivityNode.8/@storyPattern/@linkVariable.0 \" name=\"firstFieldOV\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.8/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.8/@storyPattern/@objectVariable.0\" name=\"lastField\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.3\" source=\"#//@ownedActivityNode.8\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.12 \" incoming=\"#//@ownedActivityEdge.7 \" name=\"set firstFieldOV to currentfieldOV\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" name=\"firstFieldOV\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable\">\r\n        <bindingExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:ObjectVariableExpression\" object=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.1\" />\r\n      </objectVariable>\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.3\" source=\"#//@ownedActivityNode.9\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StopNode\" incoming=\"#//@ownedActivityEdge.3 \" name=\"pattern\">\r\n    <returnValue xsi:type=\"SDMLanguage.patterns.patternExpressions:ObjectVariableExpression\" object=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.0\" />\r\n  </ownedActivityNode>\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.13 \" incoming=\"#//@ownedActivityEdge.6 \" name=\"For every row crate the first field of the row\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" name=\"firstFieldOV\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable\">\r\n        <bindingExpression xsi:type=\"SDMLanguage.calls.callExpressions:MethodCallExpression\" callee=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformField\">\r\n          <ownedParameterBindings parameter=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformField/pattern\">\r\n            <valueExpression xsi:type=\"SDMLanguage.expressions:TextualExpression\" expressionText=\"pattern\" />\r\n          </ownedParameterBindings>\r\n          <ownedParameterBindings parameter=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformField/thisOV\">\r\n            <valueExpression xsi:type=\"SDMLanguage.expressions:TextualExpression\" expressionText=\"thisOV\" />\r\n          </ownedParameterBindings>\r\n          <ownedParameterBindings parameter=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformField/before\">\r\n            <valueExpression xsi:type=\"SDMLanguage.expressions:TextualExpression\" expressionText=\"firstFieldNode\" />\r\n          </ownedParameterBindings>\r\n          <ownedParameterBindings parameter=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformField/after\">\r\n            <valueExpression xsi:type=\"SDMLanguage.expressions:TextualExpression\" expressionText=\"firstFieldNodeAfter\" />\r\n          </ownedParameterBindings>\r\n          <target xsi:type=\"SDMLanguage.patterns.patternExpressions:ObjectVariableExpression\" object=\"#//@ownedActivityNode.6/@storyPattern/@objectVariable.0\" />\r\n        </bindingExpression>\r\n      </objectVariable>\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.6\" source=\"#//@ownedActivityNode.11\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.14 \" incoming=\"#//@ownedActivityEdge.4 \" name=\"fetch the corresponding node (same index) in the after subtree\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.12/@storyPattern/@linkVariable.0 \" name=\"currentFieldNodeAfter\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\">\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"EQUAL\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/MocaTree#//TreeElement/index\" object=\"#//@ownedActivityNode.12/@storyPattern/@objectVariable.0\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/MocaTree#//TreeElement/index\" object=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.1\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.12/@storyPattern/@objectVariable.0\" source=\"#//@ownedActivityNode.12/@storyPattern/@objectVariable.1\" name=\"children\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.12/@storyPattern/@linkVariable.0 \" name=\"rowNodeAfter\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.5\" source=\"#//@ownedActivityNode.12\" />\r\n</SDMLanguage.activities:Activity>" });
		addAnnotation(
				getRuleBuilder__TransformField__StoryPattern_ObjectVariable_Node_Node(),
				source,
				new String[] {
						"XMI",
						"<?xml version=\"1.0\" encoding=\"ASCII\"?>\r\n<SDMLanguage.activities:Activity xmlns:xmi=\"http://www.omg.org/XMI\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ecore=\"http://www.eclipse.org/emf/2002/Ecore\" xmlns:SDMLanguage.activities=\"http://www.moflon.org/SDMLanguage.activities\" xmlns:SDMLanguage.expressions=\"http://www.moflon.org/SDMLanguage.expressions\" xmlns:SDMLanguage.patterns=\"http://www.moflon.org/SDMLanguage.patterns\" xmlns:SDMLanguage.patterns.patternExpressions=\"http://www.moflon.org/SDMLanguage.patterns.patternExpressions\" xmlns:SDMLanguage.calls.callExpressions=\"http://www.moflon.org/SDMLanguage.calls.callExpressions\" xmlns:SDMLanguage.calls=\"http://www.moflon.org/SDMLanguage.calls\" xsi:schemaLocation=\"http://www.moflon.org/SDMLanguage.activities SDMLanguage.ecore#//activities http://www.moflon.org/SDMLanguage.patterns SDMLanguage.ecore#//patterns\" owningOperation=\"http://www.moflon.org/BoardGame#//RuleBuilder/transformField\">\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StartNode\" outgoing=\"#//@ownedActivityEdge.0 \" name=\"RuleBuilder::transformField (pattern: StoryPattern, figureOV: ObjectVariable, before: Node, after: Node): ObjectVariable\" />\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.2\" source=\"#//@ownedActivityNode.0\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.1 #//@ownedActivityEdge.2 \" incoming=\"#//@ownedActivityEdge.3 \" name=\"If before node (representing a field in the before sub(Moca)tree) is labeled with &quot;THIS_FIELD&quot; (# in textual syntax) then create link from the figure to corresponding field (indicating that figure is on the created field) and mark it as &quot;DESTROY&quot;\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" name=\"before\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\">\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"EQUAL\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/MocaTree#//TreeElement/name\" object=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.0\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;THIS_FIELD&quot;\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n      </objectVariable>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" incomingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.0 \" name=\"createdFieldOV\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable\">\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//NamedElement/name\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;currentField&quot;\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.3\" name=\"target\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.1 \" name=\"figureOV\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.0 \" incomingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.1 #//@ownedActivityNode.1/@storyPattern/@linkVariable.2 \" name=\"link\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/LinkVariable\">\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//NamedElement/name\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;field&quot;\" />\r\n        </attributeAssignment>\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//patterns/LinkVariable/bindingOperator\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"SDMLanguage.patterns.BindingOperator.DESTROY\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.3\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.2\" name=\"outgoingLink\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.3\" source=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.4\" name=\"linkVariable\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.1/@storyPattern/@linkVariable.2 \" name=\"pattern\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/StoryPattern\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"FAILURE\" target=\"#//@ownedActivityNode.3\" source=\"#//@ownedActivityNode.1\" />\r\n  <ownedActivityEdge guard=\"SUCCESS\" target=\"#//@ownedActivityNode.4\" source=\"#//@ownedActivityNode.1\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.3 \" incoming=\"#//@ownedActivityEdge.0 \" name=\"create a new Field Object Variable; set type to fieldClass; add it to the story pattern\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.0 \" name=\"this\" type=\"ecore:EClass http://www.moflon.org/BoardGame#//RuleBuilder\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.0 #//@ownedActivityNode.2/@storyPattern/@linkVariable.1 \" name=\"fieldClass\" type=\"ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.0\" name=\"fieldClass\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.1\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.2\" name=\"type\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.1 \" incomingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.2 \" name=\"createdFieldOV\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable\">\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//NamedElement/name\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;field&quot;+before.getParentNode().getIndex()+before.getIndex()\" />\r\n        </attributeAssignment>\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable/bindingOperator\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"SDMLanguage.patterns.BindingOperator.CHECK_ONLY\" />\r\n        </attributeAssignment>\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable/bindingSemantics\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"SDMLanguage.patterns.BindingSemantics.MANDATORY\" />\r\n        </attributeAssignment>\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable/bindingState\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"SDMLanguage.patterns.BindingState.UNBOUND\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.2\" source=\"#//@ownedActivityNode.2/@storyPattern/@objectVariable.3\" name=\"objectVariable\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.2/@storyPattern/@linkVariable.2 \" name=\"pattern\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/StoryPattern\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.1\" source=\"#//@ownedActivityNode.2\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.4 \" incoming=\"#//@ownedActivityEdge.1 \" name=\"If after node (representing a field in the after sub(Moca)tree) is labeled with &quot;THIS_FIELD&quot; then create link from the figure to corresponding field (indicating that figure has to be moved on created field) and mark it as &quot;CREATE&quot;\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" incomingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.0 \" name=\"createdFieldOV\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable\">\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//NamedElement/name\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;field&quot;\" />\r\n        </attributeAssignment>\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable/bindingState\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"SDMLanguage.patterns.BindingState.BOUND\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.0\" source=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.2\" name=\"target\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" name=\"after\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\">\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"EQUAL\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/MocaTree#//TreeElement/name\" object=\"#//@ownedActivityNode.1/@storyPattern/@objectVariable.0\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;THIS_FIELD&quot;\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n      </objectVariable>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.0 #//@ownedActivityNode.3/@storyPattern/@linkVariable.2 \" incomingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.1 \" name=\"link\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/LinkVariable\">\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//patterns/LinkVariable/bindingOperator\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"SDMLanguage.patterns.BindingOperator.CREATE\" />\r\n        </attributeAssignment>\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//NamedElement/name\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;field&quot;\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.2\" source=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.3\" name=\"outgoingLink\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.1 \" name=\"figureOV\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" incomingLink=\"#//@ownedActivityNode.3/@storyPattern/@linkVariable.2 \" name=\"pattern\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/StoryPattern\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.4\" source=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.2\" name=\"pattern\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.5\" source=\"#//@ownedActivityNode.3\" />\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StopNode\" incoming=\"#//@ownedActivityEdge.2 #//@ownedActivityEdge.5 \" name=\"createdFieldOV\">\r\n    <returnValue xsi:type=\"SDMLanguage.patterns.patternExpressions:ObjectVariableExpression\" object=\"#//@ownedActivityNode.3/@storyPattern/@objectVariable.0\" />\r\n  </ownedActivityNode>\r\n  <ownedActivityNode xsi:type=\"SDMLanguage.activities:StoryNode\" forEach=\"false\" outgoing=\"#//@ownedActivityEdge.5 \" incoming=\"#//@ownedActivityEdge.4 \" name=\"If before node (representing a field in the before sub(Moca)tree) is labeled with &quot;EMPTY_FIELD&quot; then create a NAC that ensures that no figure is on this field\">\r\n    <storyPattern>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" name=\"before\" type=\"ecore:EClass http://www.moflon.org/MocaTree#//Node\">\r\n        <constraint>\r\n          <constraintExpression xsi:type=\"SDMLanguage.expressions:ComparisonExpression\" operator=\"EQUAL\">\r\n            <leftExpression xsi:type=\"SDMLanguage.patterns.patternExpressions:AttributeValueExpression\" attribute=\"http://www.moflon.org/MocaTree#//TreeElement/name\" object=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.0\" />\r\n            <rightExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;EMPTY_FIELD&quot;\" />\r\n          </constraintExpression>\r\n        </constraint>\r\n      </objectVariable>\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.5/@storyPattern/@linkVariable.3 \" name=\"createdFieldOV\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.5/@storyPattern/@linkVariable.0 #//@ownedActivityNode.5/@storyPattern/@linkVariable.2 \" name=\"pattern\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/StoryPattern\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.5/@storyPattern/@linkVariable.5 \" incomingLink=\"#//@ownedActivityNode.5/@storyPattern/@linkVariable.0 #//@ownedActivityNode.5/@storyPattern/@linkVariable.1 \" name=\"noFigure\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable\">\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//patterns/ObjectVariable/bindingSemantics\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"SDMLanguage.patterns.BindingSemantics.NEGATIVE\" />\r\n        </attributeAssignment>\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//NamedElement/name\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;noFigure&quot;\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.3\" source=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.2\" name=\"objectVariable\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.3\" source=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.4\" name=\"target\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" bindingState=\"UNBOUND\" outgoingLink=\"#//@ownedActivityNode.5/@storyPattern/@linkVariable.1 \" incomingLink=\"#//@ownedActivityNode.5/@storyPattern/@linkVariable.2 #//@ownedActivityNode.5/@storyPattern/@linkVariable.3 \" name=\"ovToFigure\" type=\"ecore:EClass http://www.moflon.org/SDMLanguage#//patterns/LinkVariable\">\r\n        <attributeAssignment attribute=\"http://www.moflon.org/SDMLanguage#//NamedElement/name\">\r\n          <valueExpression xsi:type=\"SDMLanguage.expressions:LiteralExpression\" type=\"\" value=\"&quot;figure&quot;\" />\r\n        </attributeAssignment>\r\n      </objectVariable>\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.4\" source=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.2\" name=\"linkVariable\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.4\" source=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.1\" name=\"outgoingLink\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"UNBOUND\" incomingLink=\"#//@ownedActivityNode.5/@storyPattern/@linkVariable.4 #//@ownedActivityNode.5/@storyPattern/@linkVariable.5 \" name=\"figureClass\" type=\"ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" target=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.5\" source=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.6\" name=\"figureClass\" />\r\n      <linkVariable xsi:type=\"SDMLanguage.patterns:LinkVariable\" bindingSemantics=\"MANDATORY\" bindingOperator=\"CREATE\" target=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.5\" source=\"#//@ownedActivityNode.5/@storyPattern/@objectVariable.3\" name=\"type\" />\r\n      <objectVariable bindingSemantics=\"MANDATORY\" bindingOperator=\"CHECK_ONLY\" bindingState=\"BOUND\" outgoingLink=\"#//@ownedActivityNode.5/@storyPattern/@linkVariable.4 \" name=\"this\" type=\"ecore:EClass http://www.moflon.org/BoardGame#//RuleBuilder\" />\r\n    </storyPattern>\r\n  </ownedActivityNode>\r\n  <ownedActivityEdge guard=\"NONE\" target=\"#//@ownedActivityNode.4\" source=\"#//@ownedActivityNode.5\" />\r\n</SDMLanguage.activities:Activity>" });
	}

} //BoardGamePackageImpl
